#pragma once

#include "../../base/obj_pointer.h"
#include "../../container/bit_set.h"

OPEN_JLIB_NS

struct Node;

struct KeyManager : public Obj {



  void dispatchDown (Ptr<Node> root, KeyCode key);
  void dispatchUp (Ptr<Node> root, KeyCode key);

private:
  void _dispatchDown (Node* node, KeyCode key);
  void _dispatchUp (Node* node, KeyCode key);

  FlagSet<KeyCode::Max> _status;
};


CLOSE_JLIB_NS

